cleaned up code grep.c