max matrix size=10