changed add and fail handlers to see if they work better when they are together