add getUnits functionality