added ternary

added ternary