Changed Sort to Stable