added updated functioning PathGrade.py