merge of the current 3.1 into the 4.0