modified dirs.c