created variables and ternary