use foreach to remove opts