added option to remove double points