used a dirty hack to add in a global var to the rdt_send fun after creating the function