group sorting now works