added design patterns explanation