Improved solution to Ex 1.11