Working on matrix class