Matrix class first version