uses Struct in build middlewares