added history of queries