add row handling and validation