working with the contact logic