abstract factory and prototype