refactor. rename
add memoization example