oh dear it works
has bugs, but switching to different organization of cases