replaced a few [0] with compatible queryDB() rows