made monad example more readable