Updated test code in main.cpp