moved query logic into the main configuration object