Final version of C filtering