updated: queryHatebase.R