#1, #26, #36: bidirectional exits, with tests
reording parameters