Replaced script that filters out best trials