Replaced an if with ?: