Added send_data function (untested)