changes hash to array