added pathcost instance variable to part