a few utility middlewares, java usable