implemented function do_remove_entry