Added list index to keys, working on type switch