Added support for different units and a base unit size