tidied dbConnection