implement design patterns