made the ternary operator return an object it can modify and it needs to call .ret() on to get the value
renamed val variable to cond where appropriate