working on the part about querying
almost done