restructured getPath