changed arrays to hashes -S