part1 of ex5_6 done