* refactoring to use a single hash (stored in an array)