tenary conditional but still having a non working issue