made node state calls more efficient
updated lib