Homework for fun and profit(?)