added design patterns.