added suport for sending msgs