implement a basic stringbuffer