sorting now works