made GetPathAtPos() more concise