updated result to using StringBuilder, comment dead var