adding main.cpp to test code