this is difficult for hours until it matches. the tree which isn´t really one yet and the algorithms. i better do the second first. the good is, the closures are for free and the statemachine can be compiled from :)