tutorial5: design patterns