using resolveTemplate