revise the all query