updated cachematrix for Assignment 2

developed the two functions with comments