removed testing to middleware