Added ds to middleware