avoid storing some matrix