added the Loudness function (no testing)