finally good version of cacheSolve