Added functionality to cp.py