first stab at homework 2