changed my turinary operator to be more readable