change display to StringWriter and PrintWriter then return
toSting().trim();