design pattern implemented