implemented Flyweight pattern