A generic data filtering tool