join re-implemented