add flyweight and proxy pattern