created template hierarchy