added history and autocompletition