added code to set matrix value, compute inverse and put into cache