refactoring + join operator