My modification to the general version of sched_test_app