adapted database setup