add render middle ware