Homework 7 attempt