tweaks to database connection