finalize template extends chain