Added new functions for dynamic unit conversion