made arrays in to hashes
fixed an error