changed parseopts to not modify the "char *cp" argument. It was