add the basic framework of flyweight pattern.