fixed processString method