edited and added code to cachematrix.R