Refactor send message