update code for order query pages