refactoring trait retrieval to support mixed collections