new vardef implementation
IMPLEMENT A VARDEF SYSTEM USING SMARTY