completed assignment changes in cachematrix.R