Imlemented proper query iterators for kD