CForestStateSampler modified