add success and error callbacks