updated getSA2Paths function