This tenary is confusing refactor