Used ternary if statements.