updated cachematrix assignment