adding proper routes for middleware