heavily refactored to keep global variables instead of recreating each time 'setup' is imported; removed some 'duplicated-code' for transitions, the code is in place but the actual transition is broken