Better autocomplete function in Lesson 7