add merge intervals and sort colors 10.29