cleanup is_finite, is_infinite