Code submitted for Assignment2