refactored code and made user to make a node a contact node