updated readme with documentation for middleware