proper database connection