added ternary comments