homework 3 ( edit 3_4, 3_5 and add 3_6)