add missing middleware and spec