more flexible matching
fix tests
prototyping the getParents function