Added onSuccess and onFailure callbacks