refactored array to hash because we don't like the magic index numbers