added middle ware and open source