create factory hierarchy