added monad transformer machinery