P1&2, 3

Problems 1 and 2 done. Problem 3 is started but not complete. Will
think about it later.