modified progtest.cc