allUnitsSideEast = []; { if (side _x == east) then { allUnitsSideEast set [count allUnitsSideEast, _x]; }; } forEach allUnits