making sure rows are unique or updated.