Work in progress: homework 3 problem 3