add .indexOfKey() method and tests