Updated functions

Functions updated to compute inverse of cached matrices