set up repository db, added methods to get repos and persist to db