simulator works; added halt to end of testcases