extract inner classes