First draft of responding to messages logic