Exploring the mechanisms leading to diffuse and filamentary modes in dielectric barrier discharges in N $$_2$$ 2 with N