separate middleware into separate files