refactored monad constructor