re-write of the design pattern makin the setup easier to understand