upgrade middleware
close #25