fixed test program and resource management