add structural queries
support custom comparators