prevent duplicate nodes