StateVar with monad transformer