rewrote pwd.c