added functionality to makeCacheMatrix and cacheSave