added example for flyweight pattern