renamed resourceid to pathsegment