refactor unit formatting