first unfinished version of filtering (for tags and titles)