add history process logic