create basic state flow

Perhaps we should handle 0 matches the same way we handle selecting ``none`` in ``refine-response``? Ideally the API should always return something, but it would be nice to ensure that the edge case is covered from this side too.