filter candidates in c, now compiles