Update pathfunctions.c