another hack to remove matrix