use only one variable for each unit type instead one foreach unit