replaced do-loops with while loops; added Energy - Time since last pulse - correlation