Finished cachematrix.R assignment