FIXED: middleware example, see issue ##114