#135 middleware as a functional interface