just to annoy you a bit: This should be "while (cp_ptr)" so with space