making things a tad more modular for tests, adding filter