extracted more subtemplates; applying DataTables logic to the result Pivot table