add middleware docs