regularize main_test.cpp