erase function and UID bug