Make printValue a member function.