Much more added to homework 4