new method in Main.java for testProg feature