refactored StateMatrix to inherit a base-matrix known as AbstractMatrix.