command execution in state monad