added echo calculation