StringBuffer changed to StringBuilder for performance purpose