make the var api somewhat more high level and move it away