create_buf handler