First cut at homework assignment 2