trying to fix cond statement