Revert "remove dead code"

This reverts commit 75bbdb930bb3e0da774d4e8ef4d6b7080d0bef47.
add black- and whitelist
implement filtering with black- and whitelist