add push function to GenPath