extracting matrix class
matrixutil functions are now static members of Matrix class