basic implementation of monad trait