emu ready
merged
refactored out messy toggle mode