moved library filtering functions into a new class;