Update to external sorting