use arrays for data instead of dictionary