Working unit conversion funciton. Not done yet.