close DB connection after query