added recursive node search function