Change td_var() to take void* for the first arg