Update detection code, addRow code