add ex 1.21 solution and explaination