new method appendPathSegment