add inner class for observing