add another level of memoization for cs table, small gain in performance