Renamed 'index' to 'key'