Switch from using hash to use array