// event listener for message event