add function for formatting numbers with units