updated cachematrix.R with completed functions