refactor the code, Creation Structure Behavior design pattern