add flyweight pattern by the structural example