some more replacement of the ternery operator