Searchfunction for MyClass