[NEW] a new general template api added