add some design pattern