Rename 'key' to 'keyIndex' or some such