converted if/then in soldiers to short circuit