Setting up db connection