Replaced the named queries by query strings