added middle ware, tests and create script