hashie::mash was treating "key" and "index" differently
refactoring