abstract the repository layer