complete remove function