implements makeCacheMatrix and cacheSolve