added the option to define an external filter class