Updated test program to add total and moved it to test directory