lots of filtering improvements