homework #5.1 & 5.2