Corrected errors and tested converstion of CP2 to coopla