fixing how we connect to the database and set its variable.