abstract factory design pattern updated