moved inner class to outer