Add matches and getAttributes functions.