tweak
improve tests
improve request middleware handling