- small changes, added superclass name to entry, moved actual query building to its own method