refactor edges again)
refactor transitionas -> event based