update test
add middleware