modified cachematrix.R with code for assignment submission