stop having a global variable for the database connection