update remove_type method