Add Factory design pattern