implemented some design patterns - out of application context