added function to set the unit value for input values