replaces internal paramaters named 'query' with 'criteria'