Refactor into one split_on_threshold method