move filter code in its own file
previous fix makes this fail but not with the same message