adding setup for middleware