matrix improvements