complete remove function.