changes from middleware testing