added onSuccess handler to reset operation