draft of effect routing code