modified address book with try and catch