add duplicate removal method