implement o tail recursive

accumulator : StringBuilder