added tpa functions (medianTPA, filterTPAsBetween)