use complex key for memoization