Working version of class search