implemented BufferedWriter and StringBuilder