making smarter constructor for MeasurementUnit