join function fixed