refactor innerJoin() with collections
refactoring outerJoin() and merge() with collections