add member function to process a string