Binomial edge ideals with quadratic Groebner bases