defined class and sorting methode