add class Matrix version 2