added design pattern