added a procedure to escape string values when returned from the toString method