tweaked values,
improved perfomance (no need to pass units, it will only loop through allUnits as far as necessary)