set up database stuff