Added history functionality for user query field.