Implemented HW2