updated cachematrix.r file