use StringBuilder instead of StringBuffer
ongoing refactoring