added second ternary