consolidate instr and sub rows