Linked to new vemsort function.