attempt to simplify unit conversion functions