need to redo check_row function