Gas falling into a dark matter halo with a quasar