phonebook - refactoring