reorganized design patterns exercise