working on getDefNode to accomodate variables and functions