Added code to functions in cachematrix.R