query from the params