inner classes must respect genericity