expands path when getting parents