Added function for unit conversion, not finished yet.