Revised analysis function. Results consistent with previous work