updated cachematrix.R with 2 functions