db.close implemented