refactor vari