fixing design pattern