search history using up and down arrows