additional check for empty sets
Typos, self, etc
The beginning of poll-query + buffer