correct design pattern