Changed sorting to use the Sort command