added memoization to fields