ternary completed
comments added