code was added for the setRow method