abstract factory and factory method added