fixed return type for parsePath