complteted remove function