second merge of some extra code