switches to a query system. implements adding and querying for objects