Callback Sort function and relation