append the history items to the proper place