updated cachematrix.R file