complete implementation of makeCacheMatrix and cacheSolve