HW4 coding finished