add middleware
Merge branch 'develop'