use an anonymous inner class