Added query_generation to queries.py