added ability to parse complex paths