add Matrix class