added if to enable disable anti-aliasing