flyweight pattern implemented