testing my key_to_index function