use each middlewares instead of connect