change the underlying monad from ReaderT to StateT