nested classes "flattening"