updated char_buffer.c