Turning setbacks into opportunities