HW4 code added