I don't see what if list.forall(_.isInstanceOf[SequenceRange]) does here (since the list is already filled with SequenceRange)