qf sorting