modify to introduce antialias feature