Switched out the if/then in localhost? to a ternary operator