merge of ranges implemented