unused code removed
make sure $unitID is always defined