design patterns

simple factory and strategy pattern