Added swapping code in sortNames function