test memoization with salt