for measurement
fix recursion bug