Handling addContact and template