Solved ex2.4