add history search with up/down key