cleanup tenary operation