added attr sorting