updated to use UnitManager and changed xoffset default value