Add ddi_var with tests