update of Monad (with functions, and changed Traverse)