added check for new row to history