final version of homework 6