Paper v1, added some test code for the c++ program