Added base query generator for testing purposes