countedNodes changed to double - has really great values