turn replay into a monad transformer