inner class exercise