organized test code in class HW4