example code for the phonebook tutorial