moved listview sorting function to shared.pas