changed StringBuffer to StringBuilder