implements send message method