refactoring, classifier started, class for queries
first working version, needs to be refactored for stability