set up database etc