all isinstance(t, list) to isinstance(t, Sequence)