sets up db connection