Updated to handle dynamic unit conversion