updated design pattern(4)