add readme example for middleware usage