added methods for Matrix class, added identity test for Matrix