some monad stuff revisited