Created new algorithm for finding pauses