ticket:3 impl
Merge branch 't3_middleware'