join function.