compatibility with python 3.x

use one parameter in matchesNode function instead of tuple parameter