wrap setting constant in a preferences space
arrange the same code