Added explicit .keys() in printIndex()