update of queries and resource id