added a first version of the FILTER. Check FIXME notes to continue