Updated homework 6