Worked up to #5 of Assignment 1.