Additional code for setRow() method