added ability to define both outer and inner classes