add specs to middleware