Switched from arrays to a hash table