add some design patterns