clean code of path.c