pop() from the set instead of trying to index into it