refactor -> move header filtering to another class