corrected db connection