added check for same name nodes and added listening mode