changed mode to dom