Apply updated member function from Ex 2.2 to Ex 2.3.