moving back to using depth for node comparison