sending logic