accesses the database