added history searching