implemted ternarium operator