added moduleFilter and isLeaf