memoized searching and relationship functions