moving handling of x-mas-mode