added onSuccess and onFailure methods in GetSample