edited cachematrix.R to complete assignment