added a leak test
changed indentatin of cpqfunction.hpp
replaced double * and new by using  vector and map