dutch sort reimpl