homework 3 (3_4 and 3_5)