how to auto-remove a option