Second part of the DQM logic.