added a way to access the database