finishing up cp.cpp