code with ternary with wacky