format_label function

Better label formatting to avoid overlapping