convert inner class to lamd style