trying  state monad