modified cachematrix.R by adding two functions