adding average signal length calculation