Adding history, up and down key