Assignment2 test code