move part of code to functions & new nodeExplorer