updates to middleware
updates to middleware