updated middleware docs