added template hierarchy