removed refercne to middle ware