nesting sets correctly