fix Decorator and Factory structure