New algorithm for finding choppiness