set up db and test environment