update sending logic