Modified Matrix.h