Added final code to cachematrix.R