Finished coding section of homework 7