sort numbers correctly