add flyweight design pattern.