revised algorithm for finding peaks near bursts