cleaned up database repository API