tested matrix2.py