abstractFactory example refined