ternary was evaluating things unnecessarily