Added state monad.