query changed with order