Code with inner class