Update matrix class for assignment 9