update code for order query layout