updated cachematrix.R so that it will support efficient inverse matrix calculation