updated tester to exit with appropriate exit status