add sorting for tests