add checks for double nodes