change dictionary to array