added join function