is "queries" necessarily in lower case here? maybe a regex would be a better matching function?