beautify hacked in order to sort elements attributes