updated cachematrix.R with my solution to the assignment