Add Factory method pattern