fixed deprecated ? operator