added multiple attemps for ajax requests