update listener to handle multiple entities in one message