Commited HW4 solution