WIP: memoization for resolve