memoized functions return copies of objects