modified variable names, added commented out code to setmatrix