improves memory usage for symmetric matrices