Completed cachematrix.R assignment