changed ajax done and fail