handle x icon