added section about middleware