Part-way through homework 4