derivequeries: added Query Mode option