change the tuples to array