new memory saving matrix