Change subtraction to after filtering