added the cp.cpp file and updated the Makefile accordingly