works for my examples, no comments yet