send messages func