Added query history