added support of trigger node
 + refactoring