sorting of return results