modify query logic, support 400 800