tests.cpp modified