Separated functionallity to deal with units