Ex 4.1: Added solution.