Added functions to find new nodes from directions