should work for tuples and lists