fixed logic with alive/dead