cleaned main.cpp for test demo