added ternary operator