remove matrix nn