updated to homework 6