updates to repository to encapsulate querying