edited and updated cachematrix.R file