Now the minimal number of queries is send as arg