Change dict to tuple of tuples to keep ordering