query now used to add messages to page