closes #2 define event when message received