HW4 programming