Updated add row functionality