add flyweight pattern.