Tried to fix comp. logic1