Use traverse instead of mapM