added max sub matrix