improved how scheme vars are generated