assignment sorting now works