doing some shadow stuff so better names can be used
swig messes up arithmetic ordering somehow, so we fix it in gen.sh