Add code to doUnitActions