make PathComponent a non-ptr method