added revised_row logic