before big changes to transformNEW.py