add middleware diagram