rename onSuccess to success and onFailure to failure