simplify the design with static inner class