properly closed database connection