Fix exclusion fn
Add tests