use filtering and just generally improve perf