refactor send message