Added homework 4 code