update replacing mysql calls with queryDB()