implement anti-aliasing in main.c