Add Factory Pattern.