add middleware support
Release 1.1.0