moved inner classes into own