add a success state to some function