new middleware signature
Merge pull request #6 from eivindfjeldstad/master

new middleware signature