better attribute formatting