replacing tuples with lists