scala nested classes