nested classes construction