Updated test.cpp