implemented anti-aliasing