generate correct keys for value set if appropriate