another temp sandbox
now all the function use a list of tuples

now all the function use a list of tuples as input