puts middlware into the specified slot